package com.lims.landInfo.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;


import javacommon.base.*;

import cn.org.rapid_framework.util.*;


/**
 * @author zzh
 * @version 1.0
 * @since 1.0
 */
@Entity
@Table(name = "LIMS_Land")
public class Land extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	//date formats
	public static final String FORMAT_CREATEDATE = DATE_FORMAT;
	public static final String FORMAT_LANDDATE = DATE_FORMAT;
	
	//columns START
    /**
     * objid       db_column: OBJID 
     */ 	
	private java.lang.String objid;
	/**
     * sno       db_column: SNO 
     */ 	
	private Integer sno;
    /**
     * address       db_column: ADDRESS 
     */ 	
	private java.lang.String address;
    /**
     * area       db_column: AREA 
     */ 	
	private java.lang.Double area;
    /**
     * changetype       db_column: CHANGETYPE 
     */ 	
	private Integer changetype;
    /**
     * credentialsarea       db_column: CREDENTIALSAREA 
     */ 	
	private java.lang.Double credentialsarea;
    /**
     * credentialsnumber       db_column: CREDENTIALSNUMBER 
     */ 	
	private Integer credentialsnumber;
    /**
     * credentialsstate       db_column: CREDENTIALSSTATE 
     */ 	
	private Integer credentialsstate;
    /**
     * describe       db_column: DESCRIBE 
     */ 	
	private java.lang.String describe;
    /**
     * ename       db_column: ENAME 
     */ 	
	private java.lang.String ename;
    /**
     * eno       db_column: ENO 
     */ 	
	private java.lang.String eno;
    /**
     * facility       db_column: FACILITY 
     */ 	
	private Integer facility;
    /**
     * gettype       db_column: GETTYPE 
     */ 	
	private Integer gettype;
    /**
     * improvement       db_column: IMPROVEMENT 
     */ 	
	private Integer improvement;
    /**
     * industrialresearch       db_column: INDUSTRIALRESEARCH 
     */ 	
	private Integer industrialresearch;
    /**
     * landno       db_column: LANDNO 
     */ 	
	private java.lang.String landno;
    /**
     * oldcontent       db_column: OLDCONTENT 
     */ 	
	private java.lang.String oldcontent;
    /**
     * oldno       db_column: OLDNO 
     */ 	
	private java.lang.String oldno;
    /**
     * othertype       db_column: OTHERTYPE 
     */ 	
	private Integer othertype;
    /**
     * owner       db_column: OWNER 
     */ 	
	private java.lang.String owner;
    /**
     * landrange       db_column: LANDRANGE 
     */ 	
	private Integer landrange;
    /**
     * reason       db_column: REASON 
     */ 	
	private Integer reason;
    /**
     * securityhousing       db_column: SECURITYHOUSING 
     */ 	
	private Integer securityhousing;
	/**
     * landdate       db_column: LANDDATE 
     */ 	
	private java.util.Date landdate;
	/**
     * createdate       db_column: CREATEDATE 
     */ 	
	private java.util.Date createdate;
	private String lng;  //经度
	private String lat;  //纬度
	
	//columns END


	public Land(){}

	public Land(java.lang.String objid){
		this.objid = objid;
	}

	public boolean equals(Object obj) {
		if(obj instanceof Land == false) return false;
		if(this == obj) return true;
		Land other = (Land)obj;
		return new EqualsBuilder()
			.append(getObjid(),other.getObjid())
			.isEquals();
	}
	
	@Column(name = "ADDRESS", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getAddress() {
		return this.address;
	}
	
	@Column(name = "AREA", unique = false, nullable = true, insertable = true, updatable = true, length = 126)
	public java.lang.Double getArea() {
		return this.area;
	}
	
	@Column(name = "CHANGETYPE", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getChangetype() {
		return this.changetype;
	}
	
	@Column(name = "CREATEDATE", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getCreatedate() {
		return this.createdate;
	}
	
	@Transient
	public String getCreatedateString() {
		return DateConvertUtils.format(getCreatedate(), FORMAT_CREATEDATE);
	}
	
	@Column(name = "CREDENTIALSAREA", unique = false, nullable = true, insertable = true, updatable = true, length = 126)
	public java.lang.Double getCredentialsarea() {
		return this.credentialsarea;
	}
	
	@Column(name = "CREDENTIALSNUMBER", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getCredentialsnumber() {
		return this.credentialsnumber;
	}
	
	@Column(name = "CREDENTIALSSTATE", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getCredentialsstate() {
		return this.credentialsstate;
	}
	@Column(name = "DESCRIBE", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getDescribe() {
		return this.describe;
	}
	
	@Column(name = "ENAME", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getEname() {
		return this.ename;
	}
	
	@Column(name = "ENO", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getEno() {
		return this.eno;
	}
	
	@Column(name = "FACILITY", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getFacility() {
		return this.facility;
	}
	
	@Column(name = "GETTYPE", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getGettype() {
		return this.gettype;
	}
	
	@Column(name = "IMPROVEMENT", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getImprovement() {
		return this.improvement;
	}
	
	@Column(name = "INDUSTRIALRESEARCH", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getIndustrialresearch() {
		return this.industrialresearch;
	}
	
	@Column(name = "LANDDATE", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getLanddate() {
		return this.landdate;
	}
	
	@Transient
	public String getLanddateString() {
		return DateConvertUtils.format(getLanddate(), FORMAT_LANDDATE);
	}
	
	@Column(name = "LANDNO", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getLandno() {
		return this.landno;
	}
	
	@Column(name = "LANDRANGE", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getLandrange() {
		return this.landrange;
	}
	
	@Column(name = "Lat", unique = false, nullable = true, insertable = true, updatable = true, length = 20)
	public String getLat() {
		return lat;
	}
	
	@Column(name = "Lng", unique = false, nullable = true, insertable = true, updatable = true, length = 20)
	public String getLng() {
		return lng;
	}
	
	@Id @GeneratedValue(generator="custom-id")
	@GenericGenerator(name="custom-id", strategy = "uuid")//unique = true, 
	@Column(name = "OBJID", nullable = false, insertable = true, updatable = true, length = 32)
	public java.lang.String getObjid() {
		return this.objid;
	}
	
	@Column(name = "OLDCONTENT", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getOldcontent() {
		return this.oldcontent;
	}
	
	@Column(name = "OLDNO", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public java.lang.String getOldno() {
		return this.oldno;
	}
	
	@Column(name = "OTHERTYPE", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getOthertype() {
		return this.othertype;
	}
	
	@Column(name = "OWNER", unique = false, nullable = true, insertable = true, updatable = true, length = 200)
	public java.lang.String getOwner() {
		return this.owner;
	}
	
	@Column(name = "REASON", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getReason() {
		return this.reason;
	}
	
	@Column(name = "SECURITYHOUSING", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getSecurityhousing() {
		return this.securityhousing;
	}
	
	@Column(name = "SNO", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Integer getSno() {
		return this.sno;
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getObjid())
			.toHashCode();
	}
	
	public void setAddress(java.lang.String value) {
		this.address = value;
	}
	
	public void setArea(java.lang.Double value) {
		this.area = value;
	}
	public void setChangetype(Integer value) {
		this.changetype = value;
	}
	
	public void setCreatedate(java.util.Date value) {
		this.createdate = value;
	}
	
	public void setCreatedateString(String value) {
		setCreatedate(DateConvertUtils.parse(value, FORMAT_CREATEDATE,java.util.Date.class));
	}
	
	public void setCredentialsarea(java.lang.Double value) {
		this.credentialsarea = value;
	}
	
	public void setCredentialsnumber(Integer value) {
		this.credentialsnumber = value;
	}
	
	public void setCredentialsstate(Integer value) {
		this.credentialsstate = value;
	}
	
	public void setDescribe(java.lang.String value) {
		this.describe = value;
	}
	
	public void setEname(java.lang.String value) {
		this.ename = value;
	}
	
	public void setEno(java.lang.String value) {
		this.eno = value;
	}
	
	public void setFacility(Integer value) {
		this.facility = value;
	}
	
	public void setGettype(Integer value) {
		this.gettype = value;
	}
	
	public void setImprovement(Integer value) {
		this.improvement = value;
	}
	
	public void setIndustrialresearch(Integer value) {
		this.industrialresearch = value;
	}
	
	public void setLanddate(java.util.Date value) {
		this.landdate = value;
	}
	
	public void setLanddateString(String value) {
		setLanddate(DateConvertUtils.parse(value, FORMAT_LANDDATE,java.util.Date.class));
	}
	
	public void setLandno(java.lang.String value) {
		this.landno = value;
	}
	
	public void setLandrange(Integer value) {
		this.landrange = value;
	}
	
	public void setLat(String lat) {
		this.lat = lat;
	}
	
	public void setLng(String lng) {
		this.lng = lng;
	}
	
	public void setObjid(java.lang.String value) {
		this.objid = value;
	}
	
	public void setOldcontent(java.lang.String value) {
		this.oldcontent = value;
	}
	public void setOldno(java.lang.String value) {
		this.oldno = value;
	}

	public void setOthertype(Integer value) {
		this.othertype = value;
	}
	public void setOwner(java.lang.String value) {
		this.owner = value;
	}

	public void setReason(Integer value) {
		this.reason = value;
	}
	
	public void setSecurityhousing(Integer value) {
		this.securityhousing = value;
	}
	
	public void setSno(Integer value) {
		this.sno = value;
	}
	
	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Objid",getObjid())
			.append("Address",getAddress())
			.append("Area",getArea())
			.append("Changetype",getChangetype())
			.append("Createdate",getCreatedate())
			.append("Credentialsarea",getCredentialsarea())
			.append("Credentialsnumber",getCredentialsnumber())
			.append("Credentialsstate",getCredentialsstate())
			.append("Describe",getDescribe())
			.append("Ename",getEname())
			.append("Eno",getEno())
			.append("Facility",getFacility())
			.append("Gettype",getGettype())
			.append("Improvement",getImprovement())
			.append("Industrialresearch",getIndustrialresearch())
			.append("Landdate",getLanddate())
			.append("Landno",getLandno())
			.append("Oldcontent",getOldcontent())
			.append("Oldno",getOldno())
			.append("Othertype",getOthertype())
			.append("Owner",getOwner())
			.append("Landrange",getLandrange())
			.append("Reason",getReason())
			.append("Securityhousing",getSecurityhousing())
			.append("Sno",getSno())
			.toString();
	}
}

